<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>添加商品 - 后台管理</title>
    <link rel="stylesheet" href="../assets/css/styles.css">
    <link rel="stylesheet" href="../assets/css/menu.css">
    <style>
        .container {
            padding: 20px;
            max-width: 800px;
            margin: 0 auto;
        }
        .form-group {
            margin-bottom: 20px;
        }
        .form-label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
        }
        .form-input, .form-textarea, .form-select {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 4px;
            box-sizing: border-box;
        }
        .form-textarea {
            height: 100px;
            resize: vertical;
        }
        .submit-btn {
            background-color: #ffffff;
            color: white;
            padding: 12px 30px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 16px;
        }
        .cancel-btn {
            background-color: #ffffff;
            color: #000000;
            padding: 12px 30px;
            border: 1px solid #000000;
            border-radius: 4px;
            cursor: pointer;
            font-size: 16px;
            margin-left: 10px;
        }
        /* 后台管理系统特有的样式 */
        .search-bar {
            margin-bottom: 20px;
            display: flex;
            gap: 10px;
        }
        .search-input {
            padding: 8px;
            border: 1px solid #ddd;
            border-radius: 4px;
        }
    </style>
</head>
<body>
    <%-- 删除对header.jsp的引用 --%>
    
    <div class="container">
        <h1>添加商品</h1>
        
        <form action="product_add_do.jsp" method="post" enctype="multipart/form-data">
            <div class="form-group">
                <label class="form-label">商品名称:</label>
                <input type="text" name="product_name" class="form-input" required>
            </div>
            
            <div class="form-group">
                <label class="form-label">价格:</label>
                <input type="number" name="price" class="form-input" step="0.01" required>
            </div>
            
            <div class="form-group">
                <label class="form-label">销售价格:</label>
                <input type="number" name="sale_price" class="form-input" step="0.01">
            </div>
            
            <div class="form-group">
                <label class="form-label">类型ID:</label>
                <input type="number" name="type_id" class="form-input" required>
            </div>
            
            <div class="form-group">
                <label class="form-label">状态:</label>
                <select name="status" class="form-select">
                    <option value="1">正常</option>
                    <option value="0">下架</option>
                </select>
            </div>
            
            <div class="form-group">
                <label class="form-label">是否置顶:</label>
                <select name="is_top" class="form-select">
                    <option value="0">否</option>
                    <option value="1">是</option>
                </select>
            </div>
            
            <div class="form-group">
                <label class="form-label">Logo:</label>
                <input type="file" name="logo" class="form-input" accept="image/*">
                <small>支持的格式: JPG, JPEG, PNG, GIF</small>
            </div>
            
            <div class="form-group">
                <label class="form-label">索引:</label>
                <input type="text" name="idx" class="form-input">
            </div>
            
            <div class="form-group">
                <label class="form-label">商品介绍:</label>
                <textarea name="intro" class="form-textarea"></textarea>
            </div>
            
            <div>
                <button type="submit" class="submit-btn">添加商品</button>
                <button type="button" class="cancel-btn" onclick="history.back()">取消</button>
            </div>
        </form>
    </div>
</body>
</html>